import java.util.PriorityQueue;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 晓星航
 * Date: 2023-04-09
 * Time: 13:48
 */

public class TestDemo {
    public static void main(String[] args) {
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();
        //每放一个元素 都得保证当前的堆 是大堆 或者是小堆
        priorityQueue.offer(12);
        priorityQueue.offer(1);
        priorityQueue.offer(17);
        System.out.println(priorityQueue.peek());//从结果可以看出来我们所创建的堆是一个小堆
        System.out.println(priorityQueue.size());

    }
    public static void main1(String[] args) {
        int[] array = {27,15,19,18,28,34,65,49,25,37};
        TestHeap testHeap = new TestHeap();
        testHeap.createHeap(array);
        System.out.println("========================");
    }
}
